﻿#ifndef CANNY_H
#define CANNY_H
#include "utils.h"
#include "bilaterafilter.h"

enum EDGEMARK
{
	NONEDGE = 0,			//non edge
	WEAKEDGE = 1,			//weak edge
	STRONGEEDGE = 2,		//strong edge
};


enum DIRECTIONMARK
{
	DRIGHT = 0,			//direction :right
	DRIGHTDOWN = 1,		//direction :right down
	DDOWN = 2,			//direction :down
	DLEFTDOWN = 3,		//direction :left down

};



char Conv2D(matrix inmat, matrix outmat, matrix gaustable);
char mycanny(matrix inmat, matrix outmat, matrix gaustable, cannypara cfg);
char NonMaxDoubleThre(matrix inmat, matrix outmat, matrix gaustable, cannypara cfg);
char BilateraMasklvs(matrix dstmat, matrix srcmat, matrix gtable, matrix mask,matrix masktextbg,double *wts, int l);
char GetMaskTextBg(matrix inmat, matrix outmat, matrix edgemap);



#endif	//CANNY_H

